﻿using Abp.Application.Services.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Basics.FileSystem.Dto
{
    public class FileItemDto: EntityDto
    {
        public string DisplayName { get; set; }
        public long UserId { get; set; }
        public FileItemType Type { get; set; }
        public List<string> Labels { get; set; }
        public long Size { get; set; }
        public string Path { get; set; }
        public string Url { get; set; }
        public bool IsFolder { get; set; }

        public FileItemDto(FileItem fileItem)
        {
            Id = fileItem.Id;
            DisplayName = fileItem.DisplayName;
            UserId = fileItem.UserId;
            Type = fileItem.Type;
            Labels = fileItem.Labels.Items;
            Size = fileItem.Size;
            Path = fileItem.Path;
            Url = fileItem.Url;
            IsFolder = fileItem.IsFolder;
        }
    }
}
